1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 package net.sf.jmimemagic;
24
25 import java.io.File;
26
27 import java.util.Map;
28
29
30 /***
31 * DOCUMENT ME!
32 *
33 * @author $Author$
34 * @version $Revision$
35 */
36 public interface MagicDetector
37 {
38
39 /***
40 * DOCUMENT ME!
41 *
42 * @return DOCUMENT ME!
43 */
44 public String getName();
45
46
47 /***
48 * DOCUMENT ME!
49 *
50 * @return DOCUMENT ME!
51 */
52 public String getDisplayName();
53
54
55 /***
56 * DOCUMENT ME!
57 *
58 * @return DOCUMENT ME!
59 */
60 public String getVersion();
61
62
63 /***
64 * DOCUMENT ME!
65 *
66 * @return DOCUMENT ME!
67 */
68 public String[] getHandledTypes();
69
70
71 /***
72 * DOCUMENT ME!
73 *
74 * @return DOCUMENT ME!
75 */
76 public String[] getHandledExtensions();
77
78
79 /***
80 * DOCUMENT ME!
81 *
82 * @param data DOCUMENT ME!
83 * @param offset DOCUMENT ME!
84 * @param length DOCUMENT ME!
85 * @param bitmask DOCUMENT ME!
86 * @param comparator DOCUMENT ME!
87 * @param mimeType DOCUMENT ME!
88 * @param params DOCUMENT ME!
89 *
90 * @return DOCUMENT ME!
91 */
92 public String[] process(byte[] data, int offset, int length, long bitmask, char comparator,
93 String mimeType, Map params);
94
95
96 /***
97 * DOCUMENT ME!
98 *
99 * @param file DOCUMENT ME!
100 * @param offset DOCUMENT ME!
101 * @param length DOCUMENT ME!
102 * @param bitmask DOCUMENT ME!
103 * @param comparator DOCUMENT ME!
104 * @param mimeType DOCUMENT ME!
105 * @param params DOCUMENT ME!
106 *
107 * @return DOCUMENT ME!
108 */
109 public String[] process(File file, int offset, int length, long bitmask, char comparator,
110 String mimeType, Map params);
111 }